{block name=report-classes}
<div class="form">
  <form class="form reports-admin" role="form" id="filter-form">
{include file='reports/input/filters.tpl'}
    <div class="form-group">
      <div class="row">
        <div class="col-sm-12">
		    <a href="javascript:void(0);" onClick="loadAverageRevenueReport($(this).closest('form'));" class="btn btn-info report-green">Report Now</a>
        </div>
      </div>
    </div>
  </form>
</div> 
<div class="form" id="avgrevenuelist-report"></div>
<script type="text/javascript">
function loadAverageRevenueReport(form) {
    $('body').css('cursor', 'wait');
    $('#avgrevenuelist-report').html('');
    $.ajax({
      type : "POST",
      url : "/admin/includes/processes/processes-reports.php",
      cache : false,
      data : "action=averagerevenuelist&"+$(form).serialize(),
      dataType : "json",
      success : function(data, textStatus) {
        try {
          $('#avgrevenuelist-report').prepend(data['html']);
          eval(data['javascript']);
          $('body').css('cursor', 'default');
        } catch (err) {
          $('body').css('cursor', 'default');
        }
      }
    });
}
</script>
{/block} 